<?php
namespace app\common\validate\tysj;

class StoreSpread extends Base {
    /**
     * 验证规则
     */
    protected $rule = [
        'lock'         => 'require',
        'id'           => 'require',
        'sid'          => 'require',
        'spreadid'     => 'require|has:tyyh\\User'
    ];


    /**
     * 提示消息
     */
    protected $message = [
        'lock.require'              => '验证规则场景不存在',
        'id.require'                => '店铺推广信息ID不能为空',
        'sid.require'               => '店铺ID不能为空',
        'spreadid.require'          => '推广用户ID不能为空',
        'spreadid.has'              => '推广用户不存在'
    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'save'        => ['sid', 'spreadid']
    ];
}